//
//  ConnectPhoneViewController.m
//  ShrimpCrowdordering
//
//  Created by 郑洲 on 2018/8/6.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "ConnectPhoneViewController.h"
#import "ResetPhoneViewController.h"

@interface ConnectPhoneViewController ()

@end

@implementation ConnectPhoneViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = REXADECIMALCOLOR(@"#eeeeee");
    // Do any additional setup after loading the view.
    self.title = @"手机号";
    
    [self setUI];
}

- (void)setUI {
    UIView *baseView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ScreenX375(47))];
    baseView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:baseView];
    
    UILabel *titleLabel =[[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(16), ScreenX375(16), ScreenX375(60), ScreenX375(15))];
    titleLabel.text = @"手机号";
    titleLabel.font = Kfont(15);
    titleLabel.textColor = REXADECIMALCOLOR(@"#333333");
    titleLabel.textAlignment = NSTextAlignmentLeft;
    [baseView addSubview:titleLabel];
    
    UILabel *phoneNumber =[[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(262), ScreenX375(16), ScreenX375(100), ScreenX375(15))];
    phoneNumber.text = self.phone;
    phoneNumber.font = Kfont(15);
    phoneNumber.textColor = REXADECIMALCOLOR(@"#333333");
    phoneNumber.textAlignment = NSTextAlignmentLeft;
    [baseView addSubview:phoneNumber];
    
    UIButton *sureBtn = [[UIButton alloc] initWithFrame:CGRectMake(ScreenX375(16),ScreenX375(87), ScreenX375(343), ScreenX375(49))];
    [sureBtn setTitle:@"更换手机号" forState:UIControlStateNormal];
    [sureBtn setBackgroundImage:[UIImage imageNamed:@"按钮背景"] forState:UIControlStateNormal];
    [sureBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [sureBtn addTarget:self action:@selector(turnToReset) forControlEvents:UIControlEventTouchUpInside];
    sureBtn.titleLabel.font = Kfont(16);
    sureBtn.layer.cornerRadius = ScreenX375(3);
    sureBtn.clipsToBounds = YES;
    [self.view addSubview:sureBtn];
}

-(void)turnToReset{
    ResetPhoneViewController *vc = [[ResetPhoneViewController alloc] init];
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

@end
